//
//  YWVideoView3.h
//  videoTest3
//
//  Created by jun peng on 2022/7/14.
//

#import <UIKit/UIKit.h>
#import "YWKLineCheatsVideoListDataStatus.h"

NS_ASSUME_NONNULL_BEGIN

@class YWVideoView3;

@protocol  YWVideoView3Delegate <NSObject>

@optional

//跳去详情都用这代理 (videoView里面的index和urlString都可以用的)
-(void)videoViewDidTap:(YWVideoView3 *)videoView;

//开始成功代理
-(void)videoViewDidStartPlay:(YWVideoView3 *)videoView;

//停止成功代理
-(void)videoViewDidSotpPlay:(YWVideoView3 *)videoView;

//放大/缩小
-(void)videoView:(YWVideoView3 *)videoView didClickBigScaleBtn:(UIButton *)btn;


@end


@interface YWVideoView3 : UIView

//创建videoPlayView
+ (instancetype)videoView;

//记录cell的位置的
@property (nonatomic, assign) NSInteger index;


//播放器是否正在播放 （这个是暂停播放也算是NO的）
@property (nonatomic, assign) BOOL isPlaying;

//播放器是否正在播放 （这个是暂停播放也算是YES的\暂停播放也叫正在播放）
@property (nonatomic, assign,readonly) BOOL isPlaying_containPause;

/* 代理 */
@property (nonatomic, weak) id<YWVideoView3Delegate>delegate;

//只读、假如设置请用播放方法那里的参数
@property(nonatomic,copy,readonly)NSString *urlString;

//开始
-(void)startPlayWithUrl:(NSString *)urlString withMute:(BOOL)mute;

//去其它view继续播放，不要先停止之前正在播放的
-(void)continuePlayWithAnthorViewWithUrl:(NSString *)urlString WithMute:(BOOL)mute;

//停止
-(void)stopPlay;

//暂停
-(void)pausePlay;

//继续
-(void)continuePlay;

- (void)snapshot:(void (^)(UIImage *))snapshotCompletionBlock;

@property (weak, nonatomic) IBOutlet UIButton *bigScaleBtn;


@property(nonatomic,strong)YWKLineCheatsVideoListDataStatus *status;

@end

NS_ASSUME_NONNULL_END
